/**************************************************************************(C)*
 *
 *  This file is part of the GreenHills project
 *  Copyright (C) 2009  TietoEnator
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 *************************************************************************(C)*/

#pragma once

#include <QtGui/QMainWindow>

namespace Ui {
    class CMainWindow;
}
namespace util {
    class CSerialPort;
    class CLineTerminal;
}
namespace gps {
    class CNMEAParser;
    class CGPS;
}

namespace client {

class CRoom;
class CGPSTestWidget;
class CCompas;
class CMainWindow : public QMainWindow {
    Q_OBJECT
public:
    CMainWindow(QWidget *pParent = 0);
    ~CMainWindow();

private:
    Ui::CMainWindow *mUi;

    //temporary location for mRoom variable
    CRoom *mRoom;
    util::CSerialPort *mSerialPort;
    util::CLineTerminal *mLineTerminal;
    gps::CNMEAParser *mNmeaParser;
    gps::CGPS *mGps;
    client::CGPSTestWidget *mGpsTestWidget;
    client::CCompas *mCompas;


private Q_SLOTS:
    void on_actionConnect_triggered();
    void on_actionDisconnect_triggered();
    void on_actionLogin_triggered();
    void on_actionLogout_triggered();
    void on_actionCreate_triggered();
    void on_actionJoin_triggered();
    void on_actionLeave_triggered();

    void onSubmitPositionTimerFired();
};

} // namespace client
